package com.zhentao.model.pojo.car.enums;

public enum CarParameter {
  //汽油
  GASOLINE(1, "汽油"),
  //柴油
  DIESEL_FUEL(2,"柴油"),
  //油电混动
  HYBRID_ELECTRIC_VEHICLE(3,"油电混动"),
  //插电混动
  PHEV(4,"插电混动"),
  //增程式
  EREV(5,"增程式"),
  //纯电动
  BEV(6,"纯电动"),
  //氢燃料电池
  FCEV(7,"氢燃料电池");
    int code;
    String text;

    CarParameter(int code, String text){
        this.code = code;
        this.text = text;
    }

    public int getCode() {
        return code;
    }

    public String getCarText() {
        return text;
    }

    public static String getCarParameter(int code){
      switch (code){
        case 1:
          return CarParameter.GASOLINE.text;
        case 2:
          return CarParameter.DIESEL_FUEL.text;
        case 3:
          return CarParameter.HYBRID_ELECTRIC_VEHICLE.text;
        case 4:
          return CarParameter.PHEV.text;
        case 5:
          return CarParameter.EREV.text;
        case 6:
          return CarParameter.BEV.text;
        case 7:
          return CarParameter.FCEV.text;
      }
     return null;
    }
}
